# def sum(x,y=30):#函数的缺省值必须放在参数列表的最后
#     m=0
#     for i in range(x,y+1):
#         m+=i
#     return m
#
# print(sum(x=1))
# print(sum(10))
# x=100
# def fun():
#     global x    #指名被修改的变量
#     x=10
#     y=20
#     return x,y
# m,n=fun()
# print(m)
# print(n)
# print(x)
count=0
#阶乘的实现
def f(x):
    global count
    count+=1
    print(f'count:{count}')
    if x==1:
        return 1
    return x*f(x-1)
print(f(5))